@layout("/common/default.html",{title:'添加',libs:['form']}){

<!--form表单-->
<form class="layui-form"  lay-filter="layui-form-quartz" id="layui-form-quartz">

    <input type="hidden" id="onlyid" name="id" value="${quartzJob.id}">
    <input type="hidden"  id="op" value="${quartzJob.op}">
    <input type="hidden" path="status" value="${quartzJob.status!}"/>

    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>

            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务名称</label>
                        <div class="layui-input-block">
                            <input type="text"  id="jobName" name="jobName" value="${quartzJob.jobName!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务组名</label>
                        <div class="layui-input-block">
                            <input type="text"  id="jobGroup" name="jobGroup" value="${quartzJob.jobGroup!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务执行时调用的类</label>
                        <div class="layui-input-block">
                            <input type="text"  id="beanClass" name="beanClass" value="${quartzJob.beanClass!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务调用的方法名</label>
                        <div class="layui-input-block">
                            <input type="text"  id="methodName" name="methodName" value="${quartzJob.methodName!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">cron执行方式</label>
                        <div class="layui-input-block">
                            <#select path="cronExpression" value="${quartzJob.cronExpression!}" items="${fnc.getDictList('cron_exp')}"/>
                        </div>
                    </div>



                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">参数</label>
                        <div class="layui-input-block">
                            <input type="text"  id="params" name="params" value="${quartzJob.params!}" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">是否并发执行</label>
                        <div class="layui-input-block">
                            <#radio type="radio" path="concurrent" value="${quartzJob.concurrent!}" items="${fnc.getDictList('yes_no')}" />
                        </div>
                    </div>



                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">备注信息</label>
                        <div class="layui-input-block">
                            <input type="text"  id="remarks" name="remarks" value="${quartzJob.remarks!}" autocomplete="off" class="layui-input">
                        </div>
                    </div>



                </div>
            </div>
        </div>

    </div>
    <div class="form-group-bottom" style="z-index: 200" align="center">
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
        <button   id="btnclose" class="layui-btn layui-btn-primary"  >&emsp;取消&emsp;</button>
    </div>

</form>
<script>

    layui.use(['form','utils', 'resAjax', 'submitform', 'openLayer','laydate'], function () {
        let $ = layui.$,
            form = layui.form,
            laydate = layui.laydate,
            utils = layui.utils,
            openLayer = layui.openLayer,
            submitform=layui.submitform,
            resAjax =layui.resAjax;

        //为表单赋初始值
        form.val('layui-form-quartz', {
        });

                laydate.render({
                    elem: '#updateDate'
                    ,type: 'datetime'
                });




            form.on("submit(btnSubmit)", function (data) {
                var field=data.field;
                // 请求后台
                submitform.form('/quartz/quartzJob/save',field);
                // TODO 权限节点校验
                return false;
            });


        });
</script>

@}
